﻿@using GC_RF.Site.Resources
@using GC_RF.Site.Resources.Constants

@model GridModel<GC_RF.Site.Models.News.NewsModel>

@{
	Layout = null;
}

@if (Model != null && Model.Items != null && Model.Pager != null)
{
	<div class="row">
		@foreach (var item in Model.Items)
		{
			<div class="col-md-4 col-sm-6">
				<div class="news-item">
					<a href="#">
						<div class="news-item-thumb">
							<img src="@(!string.IsNullOrWhiteSpace(item.ImageUrl) ? item.ImageUrl : StaticResources.DefaultNewsImageUrl)" alt="">
						</div>
					</a>
					<div class="news-item-infos">
						<ul class="news-item-social">
							<li><a href="#" class="fa fa-facebook"></a></li>
							<li><a href="#" class="fa fa-twitter"></a></li>
							<li><a href="#" class="fa fa-linkedin"></a></li>
							<li><a href="#" class="fa fa-instagram"></a></li>
						</ul>
						<a href="#"><h4 class="news-item-header">@item.ShortTitle</h4></a>
						<span class="news-item-date">@item.Date</span>
						<p class="news-item-desc">@item.Preview</p>
					</div>
				</div>
			</div>
		}
	</div>
	<div class="row">
		<div class="col-md-12">
			<div id="news-pager">
				@Html.DisplayFor(m => Model.Pager, Views.Pager)
			</div>
		</div>
	</div>
}